*                     Replication File for                                     
*                      Jessica A. Stanton                                      
*       REBEL GROUPS, INTERNATIONAL HUMANITARIAN LAW, AND 
*          CIVIL WAR OUTCOMES IN THE POST-COLD WAR ERA
*           (published in International Organization)                             
*
*****************************************
**** FIGURES AND TABLES IN MAIN TEXT ****
*****************************************                        
*    
* DESCRIPTIVE STATISTICS
* 
* NOTE: The descriptive statistics on conflict outcomes do not include the 1991-2002 conflict in Somalia.  
* The central government collapsed during this period, and I do not code government behavior for this case.

* Figure 1  
tab outcome if rrestraint==1 & gcivtargeting==1                        
tab outcome if rrestraint==1 & gcivtargeting==0
tab outcome if rrestraint==0 & gcivtargeting==1
tab outcome if rrestraint==0 & gcivtargeting==0 & government~="Somalia [no government coded]"

* Figure 2
tab gsanctions if rrestraint==1 & gcivtargeting==1 & outcome~=.                       
tab gsanctions if rrestraint==1 & gcivtargeting==0 & outcome~=.
tab gsanctions if rrestraint==0 & gcivtargeting==1 & outcome~=.
tab gsanctions if rrestraint==0 & gcivtargeting==0 & outcome~=. & government~="Somalia [no government coded]"

* Figure 3
tab UNcondemn if rrestraint==1 & gcivtargeting==1 & outcome~=.                        
tab UNcondemn if rrestraint==1 & gcivtargeting==0 & outcome~=. 
tab UNcondemn if rrestraint==0 & gcivtargeting==1 & outcome~=. 
tab UNcondemn if rrestraint==0 & gcivtargeting==0 & outcome~=. & government~="Somalia [no government coded]"

* STATISTICAL ANALYSES: CONFLICT OUTCOME

* TABLE 2: ORDERED LOGIT ANALYSES -- CONFLICT OUTCOME
* Model 1: Basic Model
ologit outcome rrestraint gcivtargeting logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 2: Interaction Term
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 3: Additional Controls
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest, cluster(countryid)

* TABLE 3: PERCENT LIKELIHOOD OF OUTCOME FAVORING REBEL GROUP
set seed 22601
estsimp ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

setx rrestraint 1 gcivtargeting 0 gcivtarget_rrestraint 0 logavdeath mean logtroop mean rintervention 0 gintervention 0 logpcgdp mean
simqi

setx rrestraint 0 gcivtargeting 0 gcivtarget_rrestraint 0 logavdeath mean logtroop mean rintervention 0 gintervention 0 logpcgdp mean
simqi
simqi, fd(pr) changex(rrestraint 0 1)

setx rrestraint 1 gcivtargeting 1 gcivtarget_rrestraint 1 logavdeath mean logtroop mean rintervention 0 gintervention 0 logpcgdp mean
simqi

setx rrestraint 0 gcivtargeting 1 gcivtarget_rrestraint 0 logavdeath mean logtroop mean rintervention 0 gintervention 0 logpcgdp mean
simqi
simqi, fd(pr) changex(rrestraint 0 1 gcivtarget_rrestraint 0 1)

* STATISTICAL ANALYSES: INTERNATIONAL DIPLOMATIC ACTIONS AGAINST GOVERNMENT

* TABLE 4: BINARY LOGIT ANALYSES -- INTERNATIONAL DIPLOMATIC ACTIONS AGAINST GOVERNMENT
* Model 1: Sanctions Against Government, Basic Model
logit gsanctions rrestraint gcivtargeting logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 2: Sanctions Against Government, Interaction Term
logit gsanctions rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 3: UN Condemnation of Government, Basic Model
logit UNcondemn rrestraint gcivtargeting logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 4: UN Condemnation of Government, Interaction Term
logit UNcondemn rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

*************************
**** APPENDIX TABLES ****
*************************

* TABLE A4: MULTINOMIAL LOGIT ANALYSES -- CONFLICT OUTCOME
* Model 1: Basic Model
mlogit outcome rrestraint gcivtargeting logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid) base(0)

* Model 2: Interaction Term
mlogit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid) base(0)

* TABLE A5: BINARY LOGIT ANALYSES -- CONFLICT OUTCOME
* Model 1: Basic Model
logit outcome_binary rrestraint gcivtargeting logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 2: Interaction Term
logit outcome_binary rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 3: Additional Controls
logit outcome_binary rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest, cluster(countryid)

*TABLE A6: ORDERED LOGIT ANALYSES -- CONFLICT OUTCOME (ALTERNATE MEASURE OF OUTCOME, USING DATA FROM PROROK 2015)
* Model 1: Basic Model
ologit prorok_adj rrestraint gcivtargeting logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 2: Interaction Term
ologit prorok_adj rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 3: Additional Controls
ologit prorok_adj rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest, cluster(countryid)

*TABLE A7: ORDERED LOGIT ANALYSES -- CONFLICT OUTCOME (ALTERNATE MEASURE OF REBEL RESTRAINT AND GOVERNMENT VIOLENCE, USING DATA FROM UCDP ONE-SIDED VIOLENCE DATASET)
* Model 1: Basic Model
ologit outcome logosv_r logosv_g logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 2: Proportional Violence Measure
ologit outcome osv_ratio logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 3: Additional Controls
ologit outcome osv_ratio logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest, cluster(countryid)

*TABLE A8: ORDERED LOGIT ANALYSES -- CONFLICT OUTCOME (ALTERNATE MEASURE OF RELATIVE STRENGTH OF BELLIGERENTS, USING DATA FROM CUNNINGHAM ET AL. 2009)
* Model 1: Basic Model
ologit outcome rrestraint gcivtargeting logavdeath rebstrength_NSA rintervention gintervention logpcgdp, cluster(countryid)

* Model 2: Interaction Term
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath rebstrength_NSA rintervention gintervention logpcgdp, cluster(countryid)

* Model 3: Additional Controls
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath rebstrength_NSA rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest, cluster(countryid)

*TABLE A9: ORDERED LOGIT ANALYSES -- CONFLICT OUTCOME (ALTERNATE MEASURE OF STATE CAPACITY, USING DATA ON TAX REVENUES AND BUREAUCRATIC QUALITY)
* Model 1 (Bureaucratic Quality Index): Basic Model
ologit outcome rrestraint gcivtargeting logavdeath logtroop rintervention gintervention icrq_bq, cluster(countryid)

* Model 2 (Bureaucratic Quality Index): Interaction Term
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention icrq_bq, cluster(countryid)

* Model 3 (Tax Revenue): Basic Model
ologit outcome rrestraint gcivtargeting logavdeath logtroop rintervention gintervention taxratio, cluster(countryid)

* Model 4 (Tax Revenue): Interaction Term
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention taxratio, cluster(countryid)

*TABLE A10: ORDERED LOGIT ANALYSES -- CONFLICT OUTCOME (ADDITIONAL CONTROLS FOR ISLAMIC POLITICAL GOALS AND GOVT ALLIANCE WITH WEST)
* Model 1: Control for Islamic Political Goals
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest Islamic, cluster(countryid)

* Model 2: Control for Alliance with West
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest WestAlly, cluster(countryid)

* Model 3: Both Controls
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest Islamic WestAlly, cluster(countryid)

* TABLE A11: BINARY LOGIT ANALYSES -- INTERNATIONAL DIPLOMATIC ACTIONS AGAINST GOVERNMENT (ALTERNATE MEASURE OF SANCTIONS AGAINST GOVERNMENT)
* Model 1: Sanctions Against Government, Basic Model
logit gsanctions_threat rrestraint gcivtargeting logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 2: Sanctions Against Government, Interaction Term
logit gsanctions_threat rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* TABLE A12: BINARY LOGIT ANALYSES -- INTERNATIONAL DIPLOMATIC ACTIONS AGAINST GOVERNMENT (DROPPING RUSSIA AND UK)
* Model 1: Sanctions Against Government, Basic Model
logit gsanctions rrestraint gcivtargeting logavdeath logtroop P5ally logpcgdp polity if government~="Russia" & government~="United Kingdom", cluster(countryid)

* Model 2: Sanctions Against Government, Interaction Term
logit gsanctions rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity if government~="Russia" & government~="United Kingdom", cluster(countryid)

* Model 3: UN Condemnation of Government, Basic Model
logit UNcondemn rrestraint gcivtargeting logavdeath logtroop P5ally logpcgdp polity if government~="Russia" & government~="United Kingdom", cluster(countryid)

* Model 4: UN Condemnation of Government, Interaction Term
logit UNcondemn rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity if government~="Russia" & government~="United Kingdom", cluster(countryid)

* TABLE A13: BINARY LOGIT ANALYSES -- INTERNATIONAL DIPLOMATIC ACTIONS AGAINST GOVERNMENT (COMPARING PRE- AND POST-1998 CONFLICTS)
* Model 1: Sanctions Against Government, Pre-July 1998 Conflicts
logit gsanctions rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity if postJuly1998==0, cluster(countryid)

* Model 2: Sanctions Against Government, Post-July 1998 Conflicts
logit gsanctions rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity if postJuly1998==1, cluster(countryid)

* Model 3: UN Condemnation of Government, Pre-July 1998 Conflicts
logit UNcondemn rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity if postJuly1998==0, cluster(countryid)

* Model 4: UN Condemnation of Government, Post-July 1998 Conflicts
logit UNcondemn rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity if postJuly1998==1, cluster(countryid)

* TABLE A14: BINARY LOGIT ANALYSES -- INTERNATIONAL DIPLOMATIC ACTIONS AGAINST GOVERNMENT (CONTROLLING FOR MULTIPARTY CONFLICTS)
* Model 1: Sanctions Against Government, Basic Model 
logit gsanctions rrestraint gcivtargeting logavdeath logtroop multiparty P5ally logpcgdp polity, cluster(countryid)

* Model 2: Sanctions Against Government, Interaction Term
logit gsanctions rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop multiparty P5ally logpcgdp polity, cluster(countryid)

* Model 3: UN Condemnation of Government, Basic Model
logit UNcondemn rrestraint gcivtargeting logavdeath logtroop multiparty P5ally logpcgdp polity, cluster(countryid)

* Model 4: UN Condemnation of Government, Interaction Term
logit UNcondemn rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop multiparty P5ally logpcgdp polity, cluster(countryid)

* TABLE A15: BINARY LOGIT ANALYSES -- WESTERN MEDIATION IN CIVIL WARS
* Model 1: Basic Model 
logit WestMediation rrestraint gcivtargeting logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 2: Interaction Term
logit WestMediation rrestraint gcivtargeting gcivtarget_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* TABLE A16: ORDERED LOGIT ANALYSES -- CONFLICT OUTCOME (INTERNATIONAL DIPLOMATIC ACTIONS INCORPORATED AS INDEPENDENT VARIABLES)
* Model 1: Sanctions 
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint gsanctions logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 2: Condemnation
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint UNcondemn logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* Model 3: Sanctions and/or Condemnation
ologit outcome rrestraint gcivtargeting gcivtarget_rrestraint gsanctions_UNcondemn logavdeath logtroop rintervention gintervention logpcgdp, cluster(countryid)

* TABLE A17: ORDERED LOGIT ANALYSES -- CONFLICT OUTCOME (FORMS OF GOVERNMENT VIOLENCE AGAINST CIVILIANS)
* Model 1: Government Civilian Targeting = Massacres of Civilians 
ologit outcome rrestraint g5massacre gmassacre_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest, cluster(countryid)

* Model 2: Government Civilian Targeting = Scorched Earth Strategies 
ologit outcome rrestraint gscorched gscorched_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest, cluster(countryid)

* Model 3: Government Civilian Targeting = Bombing or Shelling of Civilians 
ologit outcome rrestraint gbombing gbombing_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest, cluster(countryid)

* Model 4: Government Civilian Targeting = Cleansing 
ologit outcome rrestraint gcleansing gcleansing_rrestraint logavdeath logtroop rintervention gintervention logpcgdp separatist multiparty duratn rstaid_nonWest, cluster(countryid)

* TABLE A18: BINARY LOGIT ANALYSES -- INTERNATIONAL DIPLOMATIC ACTIONS (SANCTIONS AGAINST GOVERNMENT) -- FORMS OF GOVERNMENT VIOLENCE AGAINST CIVILIANS
* Model 1: Government Civilian Targeting = Massacres of Civilians
logit gsanctions rrestraint g5massacre gmassacre_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 2: Government Civilian Targeting = Scorched Earth Strategies
logit gsanctions rrestraint gscorched gscorched_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 3: Government Civilian Targeting = Bombing or Shelling of Civilians
logit gsanctions rrestraint gbombing gbombing_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 4: Government Civilian Targeting = Cleansing
logit gsanctions rrestraint gcleansing gcleansing_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* TABLE A19: BINARY LOGIT ANALYSES -- INTERNATIONAL DIPLOMATIC ACTIONS (UN CONDEMNATION OF GOVERNMENT) -- FORMS OF GOVERNMENT VIOLENCE AGAINST CIVILIANS
* Model 1: Government Civilian Targeting = Massacres of Civilians
logit UNcondemn rrestraint g5massacre gmassacre_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 2: Government Civilian Targeting = Scorched Earth Strategies
logit UNcondemn rrestraint gscorched gscorched_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 3: Government Civilian Targeting = Bombing or Shelling of Civilians
logit UNcondemn rrestraint gbombing gbombing_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

* Model 4: Government Civilian Targeting = Cleansing
logit UNcondemn rrestraint gcleansing gcleansing_rrestraint logavdeath logtroop P5ally logpcgdp polity, cluster(countryid)

